package com.seata.feign;

import com.seata.model.Storage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: TongRui乀
 * @Date: 2019-12-06 14:24
 * @description：
 */
@FeignClient("Seata-Storage")
public interface StorageFeign {

    @PostMapping("storage/decreaseStorage")
    Integer decreaseStorage(@RequestBody Storage storage);

    @GetMapping("storage/getStorageById")
    Storage getStorageById(@RequestParam("id") Integer id);

}
